<?php
include 'config.php';
	$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die ("Could not execute query");
	$query = "SELECT * FROM d3";
	//echo $query;
	$result = mysqli_query($con,$query) or die ("Could not get the user lex information");
	$numrows = mysqli_num_rows($result);
	while ($row = mysqli_fetch_array($result))
    {
    	$lextitle = $row['title'];
    	$lexcontext = $row['context'] ;
	    	$lexid = $row['id'] ;
		    	$lexsource = $row['source'] ;
			    	$lexuserid = $row['userid'] ;
		
print_r($result);
print_r(json_encode($result));

	}
		
for ($x = 0; $x < $numrows; $x++) {
        $data[] = mysqli_fetch_row($result);
  print_r(json_encode($data));  
}

?>

